package com.yvon.maple.service.system.mapper;

import com.yvon.boot.mybatis.BaseMapper;
import com.yvon.maple.cloud.api.system.dto.BackendResourceDTO;
import com.yvon.maple.service.system.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author : Yvon
 * @since : 2021-09-24
 */
@Mapper
public interface PermissionMapper extends BaseMapper<Permission> {

    /**
     * 查询后端资源
     *
     * @return List<BackendResourceDTO>
     * @author : Yvon / 2021-11-25
     */
    List<BackendResourceDTO> getBackendResource();

    /**
     * 更新菜单孩子
     *
     * @param updateChildList 更新子列表
     * @return int
     * @author : Yvon / 2022-03-14
     */
    int updateMenuChildren(@Param("menus") List<Permission> updateChildList);
}
